package cn.melonlib.specials.auth.model.entity;

import cn.melonlib.cores.commons.model.entity.RecordEntity;
import cn.melonlib.cores.model.anno.ModelComment;
import cn.melonlib.specials.auth.model.enums.TenantType;
import lombok.Data;
import lombok.EqualsAndHashCode;

import javax.persistence.*;

@SuppressWarnings("serial")
@Data
@EqualsAndHashCode(callSuper=true)
@Entity(name="Tenant")
@Table(name = "adm_tenant",schema = "ustudy_admin")
@ModelComment("租户")
public class Tenant extends RecordEntity {
	
	@ModelComment("域名")
	private String domain;

	@ModelComment("编码")
	private String code;
	
	@ModelComment("名称")
	private String name;
	
	@ModelComment("LOGO160*160")
	private String logo;
	
	@ModelComment("会员等级")
	private Integer vip = 0;
	
	@ModelComment("网盘空间")
	private Long cloudSize;
	
	@ModelComment("账号有效期")
	private Long startDate;
	
	@ModelComment("账号有效期")
	private Long endDate;
	
	@ModelComment("联系人")
	private String master;

	@ModelComment("联系手机")
	private String phone;

	@ModelComment("地址")
	private String addr;

	@ModelComment("经度")
	private Double longitude = 0d;

	@ModelComment("纬度")
	private Double latitude = 0d;

	@Enumerated(EnumType.STRING)
	private TenantType tenantType = TenantType.TEACHER;
	
	@Column
	@Lob
	@Basic(fetch = FetchType.LAZY)
	private String memo;
	
	@ModelComment("上线或下线")
	private Boolean online = true;
	
}
